# Features FAQ

### How to import UI component library on demand?

To configure the on-demand import of the component library, you can configure it through [source.transformImport](/config/source/transform-import), which is equivalent to [babel-plugin-import](https://npmjs.com/package/babel-plugin-import).

```ts
export default {
  source: {
    transformImport: [
      {
        libraryName: 'my-components',
        libraryDirectory: 'es',
        style: true,
      },
    ],
  },
};
```

---

### How to run ESLint during compilation?

For the sake of compilation performance, Rsbuild will not perform ESLint verification during the compilation process by default. If you require this feature, you can use Rsbuild's [ESLint plugin](https://github.com/rspack-contrib/rsbuild-plugin-eslint).

---

### How to configure CDN path for static assets?

To upload static assets such as JS and CSS to CDN for use, set the URL prefix of static assets through the [output.assetPrefix](/config/output/asset-prefix) configuration.

```js
export default {
  output: {
    assetPrefix: 'https://cdn.example.com/assets/',
  },
};
```

---

### How to remove console after production build?

For the production build, we can remove the `console` from the code, so as to avoid the log of the development mode being output to the production.

Rsbuild provides a configuration option to remove console by default, please see [performance.removeConsole](/config/performance/remove-console).

---

### How to view the final generated Rspack configuration?

By using the Rsbuild debug mode, you can view the Rspack configuration generated by Rsbuild.

You can enable the debug mode of Rsbuild by adding the `DEBUG=rsbuild` environment variable when performing the build. In this mode, the internally generated Rspack configuration will be outputted to the "dist" directory.

```bash
➜ DEBUG=rsbuild pnpm dev

  ...
  rsbuild init plugins
  rsbuild init plugins done
  rsbuild use Rspack v1.0.0
  ...

config inspection completed, generated files:

  - Rsbuild config: /root/my-project/dist/.rsbuild/rsbuild.config.mjs
  - Rspack config (web): /root/my-project/dist/.rsbuild/rspack.config.web.mjs
```

---

### How to ignore specific warnings?

By default, Rsbuild will print all error and warning logs generated by the build process.

If a large number of warning logs are generated due to the three-party package, it cannot be processed temporarily, and you want to ignore it. Specific warning logs can be ignored through the `ignoreWarnings` configuration provided by Rspack.

```ts
export default {
  tools: {
    rspack: {
      ignoreWarnings: [/Using \/ for division outside of calc()/],
    },
  },
};
```

For details, please refer to: [ignoreWarnings](https://rspack.rs/config/other-options#ignorewarnings).
